package cn.akwangl.design.pattern.creational.singleton;

/**
 * 单例模式测试.
 *
 * @author youyongkun
 * @date 2021/11/24 16:20
 */
public class Test {

    public static void main(String[] args) {
        Runnable runnable = () -> {
            System.out.println(LazySingleton.instance());
        };

        Thread t1 = new Thread(runnable);
        Thread t2 = new Thread(runnable);

        t1.start();
        t2.start();

        System.out.println("end ");

    }

}
